//------------------------------------------------------------------------------
// <copyright file="Stature.cpp" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------


#include "stdafx.h"
#include "Stature.h"

namespace Microsoft { namespace Internal { namespace GamesTest { namespace Rpc { namespace Server { namespace TestHooks
{
	Stature::Stature() : 
		height(0), weight(0)
	{
	}

	HRESULT Stature::FromRpcArchive(RpcArchive& archive, Stature* result)
	{
		HRESULT hr = E_FAIL;

		if(result == nullptr)
		{
			CHK(E_INVALIDARG);
		}

		CHK(archive.GetNamedValue(L"height", &result->height));
		CHK(archive.GetNamedValue(L"weight", &result->weight));
end:
		return hr;
	}

	HRESULT Stature::ToRpcArchive(RpcArchive* result)
	{
		HRESULT hr = E_FAIL;

		if(result == nullptr)
		{
			CHK(E_INVALIDARG);
		}

		CHK(result->SetNamedValue(L"height", height));
		CHK(result->SetNamedValue(L"weight", weight));
end:
		return hr;
	}
}}}}}}